
import axios from "../request";
interface Params {
    goodsCount: number;
    goodsId?: number;
    cartItemId?: number;
}
export function addCart(params: Params) {
    return axios.post("/shop-cart", params);
}

export function modifyCart(params: Params) {
    return axios.put("/shop-cart", params);
}

export function getCart() {
    return axios.get("/shop-cart");
}

export function deleteCartItem(id: string | number) {
    return axios.delete(`/shop-cart/${id}`);
}
